//
//  StoreTableViewCell.m
//  renmingongshe
//
//  Created by macbook on 2017/10/24.
//  Copyright © 2017年 xiaodian. All rights reserved.
//

#import "StoreTableViewCell.h"

@implementation StoreTableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
    _type.layer.borderColor = [[UIColor colorWithHex:0xff3539]CGColor];
    _type.layer.borderWidth = 1.0f;
    [_type.layer setCornerRadius:3.0];
    _type.layer.masksToBounds = YES;
    
    _btn.layer.borderColor = [[UIColor colorWithHex:0xff3539]CGColor];
    _btn.layer.borderWidth = 1.0f;
    [_btn.layer setCornerRadius:3.0];
    _btn.layer.masksToBounds = YES;
}

- (IBAction)click:(id)sender {
    self.back();
}

- (void)cellConfigureDic:(NSDictionary *)dic
{
    if (![TXUtilsString isBlankString:dic[@"shopImg"]]) {
        [_storeIma sd_setImageWithURL:[NSURL URLWithString:[Utils getImaSting:dic[@"shopImg"]]] placeholderImage:[UIImage imageNamed:@"NoStore"] options:SDWebImageRetryFailed];
    }else{
        [_storeIma setImage:[UIImage imageNamed:@"NoStore"]];
    }
    _name.text = dic[@"shopName"];
    _desc.text = dic[@"cats"];
    _price.text = [NSString stringWithFormat:@"信用分：%@", dic[@"cs"]];
    _type.text = [NSString stringWithFormat:@" %@ ", dic[@"type"]];
}

- (void)cellConfigureDicLOStoreList:(NSDictionary *)dic
{
    if (![TXUtilsString isBlankString:dic[@"shopImg"]]) {
        [_storeIma sd_setImageWithURL:[NSURL URLWithString:[Utils getImaSting:dic[@"shopImg"]]] placeholderImage:[UIImage imageNamed:@"NoStore"] options:SDWebImageRetryFailed];
    }else{
        [_storeIma setImage:[UIImage imageNamed:@"NoStore"]];
    }
    _name.text = dic[@"shopName"];
    _desc.text = [NSString stringWithFormat:@"范围 %@", dic[@"shop_cats"]];
    _price.text = [NSString stringWithFormat:@"信用分：%@", dic[@"cs"]];
    _type.text = [NSString stringWithFormat:@" %@ ", dic[@"cat_name"]];
}


- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
